home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMIBEST2.ADF / Best of AMICUS 2 / PrtDrvGen2.3 / PDG.doc < prev    next >
Text File  |  1987-07-22  |  10KB  |  249 lines

  1. PrtDrvGen 2.3 / J°rgen Thomsen 25-Jun-1987
  2. ==========================================
  3.  
  4. Version 2.3 is basically identical to version 2.2. It corrects a couple of
  5. bugs preventing the use of parameters 342 & 343 (sending a block of raw bytes
  6. to the printer).
  7.  
  8. The PrtDrvGen and PrtDrv.lod files have been changed as well as minor changes
  9. of the documentation.
  10.  
  11. The AssignPrt program should now always make the proper file note on the
  12. capture file.
  13. ---------------------
  14.  
  15. The PrtDrvGen program must be run from the CLI and it will use files
  16. located in the current directory.
  17.  
  18. There are no command line parameters for the PrtDrvGen.
  19. The PrtDrvGen is the user interface which will generate an ASCII parameter
  20. file used as input to the PrtDrvGen2 program, which is basically the same
  21. program as the version 1.1 PrtDrvGen.
  22.  
  23. When the PrtDrvGen terminates it will optionally execute PrtDrvGen2. You
  24. may run PrtDrvGen2 yourself by executing PrtDrvGen2 <printer name>, but
  25. there should be no need for that (at least not on a 512K Amiga).
  26.  
  27. Always remember to hit RETURN after changing or entering a printer command
  28. string. If you don't do that the changed string will not be stored.
  29.  
  30. Never embed the SPACE character in the driver name.
  31.  
  32. If you select the "Save parameters only" option when quitting the program,
  33. the headers as well as the actual parameter strings will be written to the
  34. ".dat" file. Use this if you want to print the ".dat" file.
  35.  
  36. Compulsory parameters
  37. =====================
  38.  
  39. The Sample.dat file contains parameters for the NEC CP6 (P6,P7,CP7,P5XL)
  40. printers (24 pin dot matrix, color, Epson compatible).
  41.  
  42. The parameters concerning the text output of the driver are 1-3 and 6-226
  43. (130-226 define the extended ASCII characters, which you may not need in
  44. the first place. If not, specify zero in 130).
  45. For text you must as a minimum set the parameters 3, 6-13, 16-17, 20-21,
  46. 24-25, 28-29, 45-46, 130. Next set 44, 58, 60, 68, 98-99, 108.
  47.  
  48. Most of the remaining parameters concern the graphics. Parameters 230-257
  49. repeat as 258-285, 286-313 and 314-341 because of the possibility of 4
  50. different graphics modes. In the following only reference to parameters
  51. in the range 230-257 is made, but it applies to all four sets.
  52.  
  53. For graphics you must as a minimum set parameters 227, 230, 232, 234-239,
  54. 247, 253, but study carefully your printer manual and the parameters not
  55. mentioned here.
  56.  
  57. Use parameter 242 (270, 298, 326) to modify the aspect ratio of the picture,
  58. making it more or less compressed vertically.
  59.  
  60.  
  61. Shareware contribution
  62. ======================
  63.  
  64. The size of the driver when loaded into memory is around 14500 bytes, which
  65. is less than the file size displayed by the List command. This is due to the
  66. loader information also contained in the file, but not loaded into memory.
  67.  
  68. In case you want to make a smaller driver and/or a driver without graphics,
  69. you should use one of the special PrtDrv.lod files supplied on the 
  70. diskette you will receive upon a full shareware contribution.
  71.  
  72.    PrtDrv_0.lod          driver with complete functions
  73.    PrtDrv_1.lod          no graphics, for daisy-wheel printers
  74.    PrtDrv_2.lod          no vectorization of the picture possible
  75.  
  76. To use one of these drivers
  77.  
  78.    Copy PrtDrv_n.lod To PrtDrv.lod       (n = 0,1,2)
  79.  
  80. before you run the programs.
  81.  
  82. Included on this diskette are the sources for the driver, so you may modify
  83. and optimize it especially for your printer. Also included is the source for
  84. the AssignPRT program, the Fmt (a simple text formatter/printer command
  85. executer e.g. "Fmt \ff" for a form feed or "Fmt \RIN" for resetting the
  86. printer to Preferences values).
  87.  
  88. Also included is the PRoff text formatter (PD software) as well as
  89. parameter files for several printers and a DeluxePaint template
  90. for making very nice diskette labels (the AssignPRT command is very handy
  91. here for printing several labels quickly). Disk space permitting other useful
  92. PD utilities I write (or find) will be included.
  93.  
  94. The "Info" item in the pull-down menu contains my address. Please, send
  95. only cash to my address in Denmark. My bank will charge around $10 for
  96. clearing a foreign check.
  97.  
  98.  
  99. Printer command parameters and the ^p and ^d parameters
  100. =======================================================
  101.  
  102.    The driver allows you access to 8 parameters/values accessed by a
  103.    ^p or ^d parameter.
  104.    Parameters ^p0 - ^p3 (^d0 - ^d3) are the ones provided with the Amiga
  105.    printer command, if any.
  106.    Parameter ^p4 - ^p7 (^d4 - ^d7) are internal values.
  107.  
  108.    These ^p and ^d parameters allow you to transfer data from
  109.          a) the standard Amiga printer commands with parameters
  110.          b) the internal variables of the driver
  111.    to the printer commands you want to send to your printer.
  112.  
  113.    A simple example is the SLRM command (Set Left Right Margin):
  114.  
  115.    If you want to set the margins to 5 and 75 you issue the command
  116.  
  117.                          ESC[5;75s
  118.  
  119.    We assume, that your printer understands this command, so you would
  120.    specify the following in the SLRM command field in PrtDrvGen:
  121.  
  122.                          ^[[^d0;^d1s
  123.  
  124.    The actual string sent to the printer would be
  125.  
  126.                          ESC[005;075s
  127.  
  128.    "^[" are just another way of specifying the ESC character
  129.    which prefixes all the Amiga printer commands.
  130.  
  131.    You will notice, that the ^d0 is the first parameter in the Amiga printer
  132.    command, the ^d1 the following etc.
  133.    If you specified ^p0 and ^p1, the ^p0 would be replaced by one binary
  134.    byte of value 5 and ^p1 by one binary byte of value 75.
  135.  
  136.    The value range of these parameters is 0 - 255 (one byte), but internally
  137.    in the driver they are stored as 16 bit signed integers (-32768 - 32767),
  138.    which you might be able to exploit in connection with the ^a and ^s para-
  139.    meters. The ^d parameter will consider the value an unsigned 16 bit
  140.    integer.
  141.  
  142.    The parameters available for inclusion into the printer commands are
  143.    specified for each parameter in PrtDrvGen. If no parameters are mentioned
  144.    it means that the value of the "^p" and "^d" parameters are undefined for
  145.    parameters 0 - 3. The parameters 4 - 7 will have the value last stored in
  146.    them.
  147.  
  148.    Use the ^f0^nnn parameter to specify the format of the string generated
  149.    by the ^d command, if the default of 3 decimal digits does not suit your
  150.    needs. To insert a 2 hexadecimal digit string use ^f0^242  (242 octal =
  151.    162 decimal, sorry about the octal, but use PrtDrvGens gadgets to
  152.    convert) to specify the base 16 two digit format.
  153.  
  154.  
  155. The graphics data
  156. =================
  157.  
  158. To clarify the parameters for storing dots in the buffer the following
  159. figure of one pass (line) of a print head is presented:
  160.  
  161.            X ->
  162.         Y  0
  163.         0  :::::::::::::::::::::::::::::::::::
  164.            :::::::::::::::::::::::::::::::::::
  165.            :::::::::::::::::::::::::::::::::::
  166.            :::::::::::::::::::::::::::::::::::
  167.  
  168. The dots may be stored in consecutive bytes as
  169.  
  170.  a) Column by column, left to right
  171.     Byte 1: [(0,0), (0,1), (0,2) .... (0,7)]  Byte 2: [(1,0),  (1,1)...]
  172.  
  173.  b) Column by column, right to left
  174.     Byte 1: [(0,7), (0,6), (0,5) .... (0,0)]  Byte 2: [(1,7),  (1,6)...]
  175.  
  176.  c) Row by row, left to right
  177.     Byte 1: [(0,0), (1,0), (2,0) .... (7,0)]  Byte 2: [(8,0),  (9,0)...]
  178.  
  179.  d) Row by row, right to left
  180.     Byte 1: [(7,0), (6,0), (5,0) .... (0,0)]  Byte 2: [(15,0), (14,0)...]
  181.  
  182.  
  183.   The parameters available for inclusion by the ^p, ^d, and ^w commands when
  184.   writing graphics are the following:
  185.  
  186.     Parameter "0-1"     Parameter "2-3"
  187.     [xxxxxxxx xxxxxxxx] [xxxxxxxx xxxxxxxx]
  188.       ^p0       ^p1         ^p2      ^p3        binary bytes
  189.       ^d0       ^d1         ^d2      ^d3        x digit bytes
  190.       ^w0                   ^w2                 x digit words
  191.  
  192.     Parameter "0-1" = ^p0 * 256 + ^p1 = ^w0
  193.  
  194.  Using the driver
  195.  ================
  196.  
  197.  The AmigaDOS printer device code and the printer specific code (printer
  198.  drivers) will not be loaded into memory until the first output operation
  199.  to the printer is performed. You may experience, that after this load
  200.  nothing happens. This is most likely caused by the driver not getting
  201.  enough contiguous memory for its buffers or because the margins specified
  202.  in Preferences are too narrow for the picture to be printed.
  203.  
  204.  The code of this driver is due to the added features larger than most
  205.  other drivers, but it will in case of memory shortage reduce its memory
  206.  requirements and execute in a slower mode. If sufficient contiguous memory
  207.  is still not available, it will print the string "No mem" on the printer
  208.  and a hexadecimal number specifying the amount of memory requested to
  209.  inform you about this.
  210.  
  211.  You may avoid this by setting margins narrower with Preferences. That will
  212.  produce a smaller picture, but it will reduce the memory requirements.
  213.  You may also choose to print with less density, if your printer supports
  214.  more than a single dots-per-inch mode.
  215.  
  216.  Some people claim that the PrtDrvGen driver is much slower than its
  217.  WorkBench counterparts. My own tests show it to be 1.3 times slower than
  218.  the Epson driver (120x72 DPI). This is caused by its generic nature which
  219.  prevents optimizing it for a specific printer. If you run comparison tests
  220.  then make sure that you are comparing the same dots per inch densities.
  221.  
  222.  
  223. Redirection of PRT: output to file
  224. ==================================
  225.  
  226.  When you use the supplied AssignPRT program to redirect PRT: output to a
  227.  file, then remember that the connection between AssignPRT and the driver
  228.  occurs when the program using the PRT: opens that device. The correct
  229.  sequence of operations would be
  230.  
  231.    RUN AssignPRT PrtFile
  232.    <run your program>
  233.  
  234.  The AssignPRT will no longer terminate by itself when the PRT: device is
  235.  closed, but it must be terminated by typing CTRL-C or the command
  236.  "Break 6 c" if the AssignPRT runs as CLI task 6 (see by issuing the
  237.  "Status" command).
  238.  
  239.  
  240. Support
  241. =======
  242.  
  243. I will make no promises to support the PrtDrvGen (especially not to
  244. those people who find it proper to call me and solicit support without
  245. submitting any Shareware contribution). However, I will do it to a certain
  246. extent on Compuserve and Plink anyway. Until around 15-Sep-1987 I will run
  247. a part time BBS at (918) 250-1600 0:00 AM - 7:00 AM CST and from about
  248. 15-Oct-1987 it will operate at 011-45-1-378727 5:00 PM - 0:00 AM CST.
  249.